package com.wfg.blog.dao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

@Data
//用户
public class SysUser {

//    @TableId(type = IdType.ASSIGN_ID) //默认id类型 （雪花算法）
    //用户多了之后，要进行分表操作，要进行分表操作，id就需要分布式id
//    @TableId(type = IdType.AUTO) //数据库自增ID
//防止前端 精度丢失 把id转为string
@JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    private String account;

    private Integer admin;

    private String avatar;

    private Long createDate;

    private Integer deleted;

    private String email;

    private Long lastLogin;

    private String mobilePhoneNumber;

    private String nickname;

    private String password;

    private String salt;

    private String status;
}